<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="common.jsp" %>
<%@ page import="java.util.*" %>

<html>
<head><title>TitleBookDescription</title>
 <link href="CSS/style1.css" rel="stylesheet">
</head>
<body>
<br>
<%
    //Get the identifier of the book to display
    String bookId = request.getParameter("bookId");
     if(bookId.equals(""))bookId="201";
    BookDetails book = bookDB.getBookDetails(bookId);
%>

<% 
   if(book==null)
   { 
%>
    <p>书号"<%=bookId%>"在数据库中不存在<p>
    <strong><a href="<%=request.getContextPath()%>/catalog.jsp">继续购物</a></strong>
<% 
     return;
   }
%>



<table width="100%" border="0" >
  <tr>
    <td><center>
	<table width="750" border="0" bgcolor="#FFFFFF">
  <tr>
      <td valign="top"><jsp:include page="banner.jsp"/></td>
  </tr>

  <tr>
    <td> <table width="100%" height="126"  border="0" cellpadding="0" cellspacing="0">
			
			    <tr>
                  <td><table width="100%" height="123"  border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="23%" align="center" valign="top"><img src="manage/cover/<%=book.getCover()%>" width="110" height="158"></td>
                      <td width="77%"><table width="100%" height="202"  border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="16%" height="24">书&nbsp;&nbsp;号：</td>
                          <td width="84%"><%=book.getBookid()%></td>
                        </tr>
                        <tr>
                          <td width="16%" height="24">书&nbsp;&nbsp;名：</td>
                          <td width="84%"><%=book.getTitle()%></td>
                        </tr>
                        <tr>
                          <td height="24">出版社：</td>
                          <td><%=book.getPubilsher()%></td>
                        </tr>
                        <tr>
                          <td height="24">作&nbsp;&nbsp;者：</td>
                          <td><%=book.getName()%></td>
                        </tr>
                        <tr>
                          <td height="24">定 &nbsp;价：</td>
                          <td><%=book.getPrice()%>（元）</td>
                        </tr>
						 <tr>
                          <td height="24">出版日期：</td>
                          <td><%=book.getYear()%></td>
                        </tr>
                          <tr><td height="39" colspan="2"><%=book.getDescription()%></td>
                        </tr>
                          <tr>
                              <td height="40" colspan="2">                                    
                                  <%if(session.getAttribute("UserName")!=null){%>
						 <input name="Submit5" type="submit" class="btn_grey" value="放入购物车"  onClick="window.location.href='catalog.jsp?Add=<%=book.getBookid()%>'">
						  <%}%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          <input name="Submit52" type="button" class="btn_grey" value="  返  回  " onClick="history.back(1);">   
         
                              </td>
                          </tr>
                      </table></td>
                    </tr>
                  </table></td>				 
			     </tr>
              </table></td>
  </tr>
  <tr>
    <td><jsp:include page="copyright.jsp"/></td>
  </tr>
</table>

    </center></td>
  </tr>
</table>
</body>
</html>